﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace CMS_GYM
{
    class clsCongNoCauLongBUS
    {
        /// <summary>
        /// Đối tượng chức năng DAO
        /// </summary>
        private clsCongNoCauLongDAO CongNoDAO = new clsCongNoCauLongDAO();

        public DataTable LayBang()
        {
            return CongNoDAO.LayBang();
        }

        public DataTable LayBangCongNoTheoThangNam(int Thang, int Nam)
        {
            return CongNoDAO.LayBangCongNoTheoThangNam(Thang, Nam);
        }

        public DataTable LayThongTinCongNo(int CongNoId)
        {
            return CongNoDAO.LayThongTinCongNo(CongNoId);
        }

        public DataTable LayThongCongNoChuaThu(decimal KhachHangId)
        {
            return CongNoDAO.LayBangCongNoChuaThu(KhachHangId);
        }

        public DataTable LayBangCongNo(decimal KhachHangId)
        {
            return CongNoDAO.LayBangCongNo(KhachHangId);
        }

        public List<clsCongNoCauLongDTO> LayDanhSachCongNoChuaThu(decimal KhacHangId)
        {
            return CongNoDAO.LayDanhSachCongNoChuaThu(KhacHangId);
        }

        public List<clsCongNoCauLongDTO> LayDanhSachCongNo(decimal KhacHangId)
        {
            return CongNoDAO.LayDanhSachCongNo(KhacHangId);
        }
      
      
        /// <summary>
        /// Thêm thông tin chức năng
        /// </summary>
        /// <param name="CongNo">
        /// MaChucNang   nvarchar(10)
        /// TenChucNang  nvarchar(255)
        /// TrangThai int
        /// </param>
        public int Them(clsCongNoCauLongDTO CongNo)
        {
            return CongNoDAO.Them(CongNo);
        }

        /// <summary>
        /// Sửa thông tin  loại mặt hàng
        /// </summary>
        /// <param name="ChucNang">
        /// MaChucNang  nvarchar(10)
        /// TenChucNang  nvarchar(255)
        /// </param>
        public int Sua(clsCongNoCauLongDTO CongNo)
        {
            return CongNoDAO.Sua(CongNo);
        }

        /// <summary>
        /// Xóa thông tin loại mặt hàng
        /// </summary>
        /// <param name="MaChucNang">Mã loại mặt hàng</param>
        public int Xoa(int CongNoId)
        {
            return CongNoDAO.Xoa(CongNoId);
        }
    }
}
